<!DOCTYPE HTML>
<html>
<head>
    <include file="Public/head"/>
    <style>
    html,body{
    	width:100%;
    	height:100%;
    	margin: 0px;
    	background: #0e0e0e;
    }
    .qrcode_box {
		position: relative;
  		top: 50%;
  		transform: translateY(-50%);
  		text-align: center;
    }
    </style>
</head>
<body>

	<div class="qrcode_box">
	<img src="{:U('pingpay/Api/qrcode',array('data'=>$data))}" />
	</div>

	<script>
	$(function(){
		var _url = "{:U('pingpay/Api/paystatus',array('app'=>$app,'table'=>$table,'order_no'=>$order_no))}";

		function result(){
			$.get(_url,'', function(data) {
            if(data.paid==1){
            	var succee_url = "{$result_url}?order_no={$order_no}";
            	window.location.href = succee_url;
            }
	        })
		};
		setInterval (result,2000);
	})
	</script>
</body>
</html>
